package com.kylin.shared.common.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import java.io.Serializable;

/**
 * 基础实体
 * @author Damon S.
 * @version v1.0.1
 * @date 2020年01月20日 15:58
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@MappedSuperclass
public class BaseEntry implements Serializable {
    @Column(name = "created_by", updatable = false, nullable = false)
    private Long createdBy;

    @Column(name = "created_at", updatable = false, nullable = false)
    private Long createdAt;

    @Column(name = "updated_by", nullable = false)
    private Long updatedBy;

    @Column(name = "updated_at", nullable = false)
    private Long updatedAt;

    @Column(name = "removed_by", nullable = false)
    private Long removedBy;

    @Column(name = "removed_at", nullable = false)
    private Long removedAt;

    @Column(columnDefinition = "TINYINT", nullable = false)
    private Integer removed;
}
